/*
*   Copyright: Fabian Hajek (2012)  Programmieren: C   -   Semesterarbeit WS 2011/2012
*
*   Projekt: Schreinerei.exe
*
*   Author: $Author: webmaster@die-schwarzen-schwaben.de $
*
*   Name: func_stock.c
*   URL:    $URL: http://semesterarbeit-wi-11-12.googlecode.com/svn/trunk/Semesterarbeit2/Schreinerei/Funktionen/stock.c $
*
*   Description:   Listet aktuelle Lagerbestaende auf
*
*   Last update:    $Date: 2012-02-11 01:37:48 +0000 (Sat, 11 Feb 2012) $
*
*   Rev:      $Rev: 45 $
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>


#include "../default/structures.h"
#include "../Definitionen/define.h"
#include "func_stock.h"

void stock(void)
{
    HEAD
    printf("\n%30sAKTUELLE LAGERBEST\x8ENDE\n\n"," ");
    HEADLINE
    printf("\n%-34s | %15s |%24s\n","Ressource", "Kosten/Einheit","Aktuelle Lagerbest\x84nde");
    HEADLINE
    struct ressource *p_ressource_start = p_ressource_end;
    int i=0;
    while(p_ressource_start)
    {
        i++;
        printf("%i. %-32s   %8.2f /",i,p_ressource_start->name,p_ressource_start->price);
        ENTITY(p_ressource_start->entity)
        printf(" %24i\n",p_ressource_start->stock);
        p_ressource_start = p_ressource_start->prev_ressource;
        HEADLINE
    }
    printf("\n");
}
